/**
 * Created with IntelliJ IDEA.
 * User: tinamt
 * Date: 7/3/14
 * Time: 2:05 PM
 * To change this template use File | Settings | File Templates.
 */


import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;

import static org.junit.Assert.assertEquals;

@RunWith(Parameterized.class)
public class SpaceToEarthConverterTest {
          private String romanInput;
          private int arabicExpected;
    public SpaceToEarthConverterTest(String romanInput,int arabicExpected)
    {
        this.romanInput=romanInput;
        this.arabicExpected=arabicExpected;
    }

    @Parameterized.Parameters
    public static Collection<Object[]> convertedRomans(){
        return Arrays.asList(new Object[][]{{"MMXIX",2019},{"XXX", 30}, {"XX", 20},{"MMCMXCIX",2999},{"MMCMXCIV",2994}});

    }
    @Test
    public void testConvertedValues() throws Exception {
        SpaceToEarthConverter e=new SpaceToEarthConverter();
        int arabicComputed =e.convert(romanInput);
        assertEquals(arabicExpected,arabicComputed);
    }
}
